package com.ylx.code.enums;

/**
 * 公共枚举
 * @author yanglixin2
 */
public enum CommonEnum {
    //delete
    IS_DELETE("已删除",1),
    UN_DELETE("未删除",0),
    DISABLE("禁用",0),
    ENABLED("启用",1),
    TRUE("是",1),
    FALSE("否",0),
    //-----操作类型
    ADD("新增",1),
    UPDATE("修改",2),
    DELETE("删除",3),
    SELECT("查询",4),
    //-----返回值code
    SUCCESS("成功",0),
    FAIL("失败",1),
    //-----手机号码
    PHONE_NUMBER_LENGTH("手机号码长度",11),

    //消息细分通知
    //工单通知
    WORK_FORM_DETAIL("workform",1),
    //产品通知
    IMPORT_PRODUCT("product",2),
    //导出通知
    EXPORT("export",3),
    //订单通知
    ORDER("order",4),
    //备件通知
    BACKUP("backup",5),
    //客户通知
    CUSTOMER("customer",6),
    //计划任务通知
    PLAN_TASK("planTask",7),
    //校验通知
    CHECK("check",-1),

    //消息中心 消息按钮类型
    BUTTON_TYPE_NONE("无",0),
    BUTTON_TYPE_HANDLE("去处理",1),
    BUTTON_TYPE_DETAIL("查看详情",2),
    BUTTON_TYPE_DOWNLOAD("下载",3),
    BUTTON_TYPE_APPROVE("去审批",4),
    BUTTON_TYPE_CONFIRM("去确认",5),
    BUTTON_TYPE_APPLY("去办理",6),
    //数据权限
    DATA_SCOPE_ALL("全公司",3),
    DATA_SCOPE_DEPARTMENT("部门",2),
    DATA_SCOPE_ONLY_SELF("个人",1),


    ;
    private final String desc;
    private final int value;

    CommonEnum(String desc, int status) {
        this.desc = desc;
        this.value = status;
    }

    public String getDesc() {
        return desc;
    }

    public int getValue() {
        return value;
    }
}
